//
//  WineView.m
//  TestMVVMWine
//
//  Created by 吴志勇 on 2020/3/27.
//  Copyright © 2020 wzy. All rights reserved.
//

#import "WineView.h"

@implementation WineView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self layout];
    }
    return self;
}

- (void)layout{
    self.tableView.frame = CGRectMake(0 ,0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height - 40);
    self.tableView.backgroundColor = [UIColor greenColor];
}

- (UITableView *)tableView{
    if (_tableView == nil) {
        _tableView = [[UITableView alloc] init];
        _tableView.estimatedRowHeight = 60;
        [self addSubview:_tableView];
        
    }
    return _tableView;
}

@end
